function createAnimation(options) {
    var to = options.to,
        from = options.from,
        totalMiunt = options.totalMiunt || 1000,
        duration = options.duration || 15,
        mines = Math.floor(totalMiunt / duration),
        cur = 0,
        dis = (to - from) / mines;

    var timerId = setInterval(() => {
        cur++
        from += dis
        if (cur >= mines) {
            from = to
            options.onmove && options.onmove(from)
            options.onend && options.onend()
            clearInterval(timerId)
            return
        }
        options.onmove && options.onmove(from)
    }, duration);

}